package com.atguigu.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author yanglin
 * @create 2023-11-10 11:42 星期五
 * description:
 */
@RestController
public class OrderConsulController {

    @Autowired
    private RestTemplate restTemplate;

    public final String INVOKE_URL = "http://cloud-providerconsul-payment";


    @GetMapping("/consumer/payment/consul")
    public String paymentInfo(){
        String result = restTemplate.getForObject(INVOKE_URL + "/payment/consul",String.class);
        return result;
    }
    
}
